/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.wen.qqrobot;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by wenwen on 2016/10/5.
 * version 1.0
 */
public class Blacklist {

    private final Set<String> blacklist = new HashSet<String>();

    public Blacklist() {
    }

    public Blacklist(String string) {
        String[] s = string.split(";");
        for (String b : s) {
            System.out.println("Blacklist-" + b);
            this.blacklist.add(b);
        }
    }

    public boolean contains(String o) {
        return blacklist.contains(o);
    }

    public boolean add(String e) {
        return blacklist.add(e);
    }

    public int size() {
        return blacklist.size();
    }

    public boolean isEmpty() {
        return blacklist.isEmpty();
    }

    public boolean remove(String o) {
        return blacklist.remove(o);
    }

    public void clear() {
        blacklist.clear();
    }

}
